;--------------------------------------
;
; strcpy.asm
;
; copy source to destination string
;
;

;--------------------------------------
;
; include defs, prototypes and macros
;

include tab6.inc

;--------------------------------------
;
; begin code segment
;

	.CODE

;--------------------------------------
;
; strcpy(value,number);
;
; strcpy requires that the
; PREPARE_STRING macro be utilized
; before strcpy is INVOKED
; 

strcpy	PROC PASCAL PUBLIC USES ds es si di,dest:PBYTE,srce:PBYTE

; initialize source

 IF mdl eq 3

; set dest es:[di]

        les     di,dest

; set srce ds:[si]

        lds     si,srce

  ELSE

        push    ds
        pop     es

; set dest es:[di]

        mov     di,dest

; set srce ds:[si]

        mov     si,srce

  ENDIF

	.WHILE 1
	mov	al,BYTE PTR ds:[si]
	mov	BYTE PTR es:[di],al
	inc	di
	inc	si
	.BREAK .IF (al==0)
	.ENDW
	ret	                       ; return to caller
strcpy	ENDP

;
; end of strcpy procedure
;
;--------------------------------------

	END

;
; end of strcpy.asm
;
;--------------------------------------


